<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>编辑用户</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 20px;
        }
        form {
            max-width: 400px;
            margin: auto;
            padding: 1em;
            border: 1px solid #CCC;
            border-radius: 1em;
        }
        div + div {
            margin-top: 1em;
        }
        input[type=text], input[type=email], input[type=number] {
            width: 100%;
            padding: .5em;
            border: 1px solid #CCC;
            border-radius: .5em;
        }
        button {
            background-color: #007bff;
            color: white;
            border: none;
            padding: .5em 1em;
            text-align: center;
            text-decoration: none;
            display: inline-block;
            font-size: 16px;
            margin: 4px 2px;
            cursor: pointer;
            border-radius: .5em;
        }
        button:hover {
            background-color: #0056b3;
        }
    </style>
</head>
<body>
<h1>编辑用户</h1>
<form action="/users/<%= user.id %>/edit" method="POST">
    <div>
        <label for="name">姓名:</label>
        <input type="text" id="name" name="name" value="<%= user.name %>" required>
    </div>
    <div>
        <label for="age">年龄:</label>
        <input type="number" id="age" name="age" value="<%= user.age %>" required>
    </div>
    <div>
        <label for="email">邮箱:</label>
        <input type="email" id="email" name="email" value="<%= user.email %>" required>
    </div>
    <button type="submit">保存更改</button>
</form>
<a href="/users">返回用户列表</a>
</body>
</html>